const layerUtils = {};

layerUtils.openJsonEdit=function (JsonStr){
    layer.open({
        title: 'vtcJson',
        area:["800px","600px"],
        content: `<div style="height: 100%" id="right"></div>`
    });
    var jsonEditor1 = document.getElementById('right');;
    var jsonOptions = {
        mode: 'code',
        modes: ['code', 'form', 'text', 'tree', 'view'],
        onError: function(err) {
            alert(err.toString());
        }
    };
    var jsonEditor = new JSONEditor(jsonEditor1, jsonOptions, [] );
    jsonEditor.set(JsonStr);
}